{js:kindeditor}
<div class="headbar">
	<div class="position"><span>商品</span><span>></span><span>品牌管理</span><span>></span><span>{if:isset($brand['id'])}编辑{else:}添加{/if}品牌</span></div>
</div>
<div class="content_box">
	<div class="content form_content">
		<form action="{url:/brand/brand_save}" method="post" enctype='multipart/form-data'>
			<table class="form_table" cellpadding="0" cellspacing="0">
				<col width="150px" />
				<col />
				<tr>
					<th>品牌名称：</th>
					<td><input class="normal" name="name" type="text" value="{$brand['name']}" pattern="required" alt="品牌名称不能为空" />
						<label>*</label>
						<input name="brand_id" value="{$brand['id']}" type="hidden" />
					</td>
				</tr>
				<tr>
					<th>排序：</th><td><input class="normal" name="sort" type="text" value="{$brand['sort']}" pattern='int' empty alt='必需为整形数值'/></td>
				</tr>
				<tr>
					<th>网址：</th><td><input class="normal" name="url" type="text" value="{$brand['url']}" pattern='url' empty alt='网址格式不正确，比如：http://www.aircheng.com' /><label>完整的URL链接地址，如：http://www.aircheng.com</label></td>
				</tr>
				<tr>
					<th>LOGO：</th><td><div>{if:isset($brand['logo'])}<img src="{webroot:$brand[logo]}" height="60px"/><br />{/if}<input type='file' class='normal' name='logo'/></div></td>
				</tr>
				<tr>
					<th>所属分类：</th>
					<td>
						{query:name=brand_category}{/query}
						{if:$items}
						<ul class="select">
							{foreach:items=$items}
							<li><label><input type="checkbox" value="{$item['id']}" name="category[]" {if:isset($brand) && stripos(','.$brand['category_ids'].',',','.$item['id'].',') !== false}checked="checked"{/if} />{$item['name']}</label></li>
							{/foreach}
						</ul>
						{else:}
						系统暂无品牌分类，<a href='{url:/brand/category_edit}' class='orange'>请点击添加</a>
						{/if}
					</td>
				</tr>
				<tr>
					<th valign="top">描述：</th><td><textarea name="description" id="description" style="width:700px;height:400px;">{$brand['description']}</textarea></td>
				</tr>
				<tr>
					<td></td><td><button class="submit" type="submit"><span>确 定</span></button></td>
				</tr>
			</table>
		</form>
	</div>
</div>

<script type="text/javascript">
$(function()
{
	//编辑器载入
	KindEditor.ready(function(K){
		K.create('#description');
	});
})
</script>